import service from "./request"

//班级管理
export function classGetPage(params, page) {
    return service({
        url: '/admin/class/page/' + page,
        method: 'get',
        params: params
    })
}


// 班级页数
export function classGetPageCount(params) {
    return service({
        url: '/admin/class/page/count',
        method: 'get',
        params: params
    })
}

// 班级添加
export function classAdd(data) {
    return service({
        url: '/admin/class',
        method: 'post',
        data: data
    })
}

//班级删除
export function classDelete(id) {
    return service({
        url: '/admin/class/' + id,
        method: 'delete'
    })
}

//专业列表
export function majorName() {
    return service({
        url: '/admin/major/names',
        method: 'get',
    })
}

//根据id获取信息
export function classInfo(id) {
    return service({
        url: '/admin/class/' + id,
        method: 'get',
    })
}


//编辑
export function classEdit(data) {
    return service({
        url: '/admin/class',
        method: 'put',
        data: data
    })
}